package P9.T05;

public class T05_3 {
    public static void main(String[] args) {
        Button a1=new Button(10,10,new Color(0,0,0));
        Button a2=a1.Clone();
        a1.c.r=10;

        System.out.println(a2.x+" "+a2.y+" "+a2.c.r);
    }
}
class Color{
    int r,g,b;
    Color(int r,int g,int b){
        this.r=r;
        this.g=g;
        this.b=b;
    }
}
class Button{
    int x;
    int y;
    Color c;
    public Button(int x, int y, Color c){
        this.x = x;
        this.y = y;
        this.c = c;
    }
    Button Clone(){
        Button b=new Button(x,y,c);
        return b;
    }
}